home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
acctg
/
dbbills
/
entrtask.prg
< prev
next >
Wrap
Text File
|
1986-11-10
|
2KB
|
94 lines
*--[ entrtask.prg ]-- enter task accomplishments
CLEAR
SELECT 1
USE client INDEX cltcode ALIAS clt
SELECT 2
SET DATE ANSI
USE taskunit INDEX taskdate ALIAS task
STORE 0 TO m_cost,m_fee,fees,m_client
m_date=DATE()
DO WHILE .T.
SET COLOR TO W+
@ 1,32 SAY "TASK DATA ENTRY"
SET COLOR TO W
@ 2,0 SAY "-------------------------------------------------------------------------------"
SET COLOR TO W+
@ 3,0 SAY "CLT DATE BEGIN END DESCRIPTION OF TASK CH HOURS FEE BILLED"
@ 22,15 SAY "Leave the CLT field empty to chage date or exit to menu."
SET COLOR TO W
line=4
DO WHILE .T.
@ line,0
m_client=0
@ line,0 GET m_client PICTURE "###"
READ
IF m_client=0
m_date=DATE()
@ 23,15 SAY "ENTER ANOTHER DATE OR ^Y TO FINISH "
SET DATE AMERICAN
@ 23,COL() GET m_date
READ
@ 23,0
IF DTOC(m_date)=" / / "
@ 21,0 CLEAR
@ 21,65 SAY "------- -------"
@ 22,50 SAY "TOTALS"
@ 22,65 SAY STR(m_cost,7,2)
@ 22,72 SAY STR(fees,7,2)
WAIT " PRESS RETURN AFTER READING SCREEN"
CLEAR
RETURN
ELSE
SET DATE ANSI
LOOP
ENDIF no date
ELSE
SET DATE ANSI
SELECT clt
SEEK m_client
IF .NOT. FOUND()
SET COLOR TO W*+
@ 22,15 SAY "CLIENT NOT VALID - TRY AGAIN"
SET COLOR TO W
WAIT " PRESS RETURN TO CONTINUE"
@ 22,0 CLEAR
m_client=0
SELECT task
LOOP
ENDIF .NOT. FOUND()
SELECT task
APPEND BLANK
REPLACE c_code WITH clt->c_code,taskdate WITH m_date,charge With .Y.
ENDIF m_start=" "
SET DATE AMERICAN
@ line,5 GET taskdate
@ line,15 GET start PICTURE "@R ##:##"
@ line,21 GET finish PICTURE "@R ##:##"
@ line,27 GET descriptn PICTURE "!XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@ line,59 GET charge PICTURE "@L"
READ
SET DATE ANSI
time_on=VAL(SUBSTR(start,1,2))+VAL(SUBSTR(start,3,2))/60
time_off=VAL(SUBSTR(finish,1,2))+VAL(SUBSTR(finish,3,2))/60
IF time_on>time_off
SET COLOR TO W*+
@ 23,15 SAY "INVALID ON AND OFF TIME - TRY AGAIN"
SET COLOR TO W
@ 23,0
LOOP
ENDIF
REPLACE hours WITH time_off-time_on
m_fee=hours*clt->rate
@ line,61 SAY STR(hours,4,1)
@ line,66 SAY STR(m_fee,6,2)
m_cost=m_cost+m_fee
IF charge
@ line,73 SAY STR(m_fee,6,2)
fees=fees+m_fee
ENDIF charge
line=line+1
line=IIF(line=21,3,line)
ENDDO WHILE .T.
ENDDO WHILE .T.
RETURN